﻿using Modules.Project;
using PetaPoco;
using PmSoft;
using PmSoft.Caching;

namespace Modules
{
    /// <summary>
    /// 保证金支付明细
    ///</summary>
    [TableName("project_security_deposit_payment_details")]
    [PrimaryKey("id", AutoIncrement = true)]
    [CacheSetting(true)]
    [Serializable]
    public class ProjectSecurityDepositPaymentDetails : IEntity
    {
        /// <summary>
        /// 主键
        ///</summary>
        [Column("id")]
        public int Id { get; set; }

        /// <summary>
        /// 项目id
        ///</summary>
        [Column("project_id")]
        public int ProjectId { get; set; }

        /// <summary>
        /// 收支编号
        ///</summary>
        [Column("code")]
        public string Code { get; set; }

        /// <summary>
        /// 收支方式(现金,银行保函,工程担保公司保函,工程保证保险,其它)
        ///</summary>
        [Column("income_way")]
        public 收支方式 IncomeWay { get; set; }

        /// <summary>
        /// 保函（险）单号
        ///</summary>
        [Column("insurance_policy_numbe")]
        public string? InsurancePolicyNumbe { get; set; }

        /// <summary>
        /// 务工人员公民身份号码
        ///</summary>
        [Column("card_number")]
        public string CardNumber { get; set; }

        /// <summary>
        /// 务工人员姓名
        ///</summary>
        [Column("person_name")]
        public string PersonName { get; set; }

        /// <summary>
        /// 工资支付金额
        ///</summary>
        [Column("pay_amount")]
        public decimal PayAmount { get; set; }

        /// <summary>
        /// 工资支付方式(现金,银行卡,社会保障卡,其他)
        ///</summary>
        [Column("pay_type")]
        public 工资支付方式 PayType { get; set; }

        /// <summary>
        /// 支出日期
        ///</summary>
        [Column("expenditure")]
        public DateTime Expenditure { get; set; }

        /// <summary>
        /// 创建时间
        ///</summary>
        [Column("create_time")]
        public DateTime CreateTime { get; set; }

        #region IEntity 成员

        [Ignore]
        object IEntity.EntityId { get { return this.Id; } }

        #endregion IEntity 成员
    }
}